Two important submission csvs were written wrong, but in anticipation of this problem we pickled the results. Opening them now.
In [1]:
import pickle
In [2]:
cd /disk/scratch/neuroglycerin/dump/
In [3]:
ls
In [4]:
with open("test.py.pkl","rb") as f:
p = pickle.load(f)
In [5]:
len(p)
Out[5]:
In [7]:
p[0].shape[0]*80
Out[7]:
Looks like everything should be there, just have to figure out why it didn't write these to the csv right. Next part was the stack:
In [8]:
import numpy as np
In [9]:
y = np.vstack(p)
In [10]:
y.shape
Out[10]:
That worked, what about finding the name for the csv?
In [11]:
import neukrill_net.utils
In [13]:
cd ~/repos/neukrill-net-work/
In [14]:
settings = neukrill_net.utils.Settings("settings.json")
In [17]:
import os
In [18]:
names = [os.path.basename(n) for n in settings.image_fnames['test']]
In [19]:
len(names)
Out[19]:
That also seems to be fine...
Only explanation I can think of at this point is that it somehow redefined the image_fname
dict to be over one of the splits. But that makes no sense because the image_fname
dictionary that gets modified is a different instance to that in the test.py
script.
Looking at the submission csvs:
In [22]:
cd /disk/scratch/neuroglycerin/submissions/
In [23]:
ls
In [24]:
!gzip -d alexnet_based_40aug.csv.gz
In [26]:
!wc -l alexnet_based_40aug.csv
The splits would have been equal to the full dataset divided by 80:
In [27]:
130400/80
Out[27]:
Including the header, that's exactly correct.
All we can do now is rewrite the submission csv with the full names and submit it to check it's valid.
In [34]:
neukrill_net.utils.write_predictions("alexnet_based_40aug.csv",y,names,settings.classes)
And we have to do the same for 16aug predictions.
In [35]:
cd /disk/scratch/neuroglycerin/dump/
In [36]:
with open("test2.py.pkl","rb") as f:
p16aug = pickle.load(f)
In [37]:
y16aug = np.vstack(p16aug)
y16aug.shape
Out[37]:
In [38]:
cd /disk/scratch/neuroglycerin/submissions/
In [39]:
neukrill_net.utils.write_predictions("alexnet_based_16aug.csv.gz",y16aug,names,settings.classes)